<script setup lang="ts">
import TheSearch from './components/TheSearch.vue'

import TabsView from '../TabsView.vue'

import { watch, ref } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const active = ref(1) // 假设这是你想在模板中使用的变量
const arr = ref([
  {
    title: '全部订单',
    path: '/order/orderItem',
  },
  {
    title: '待评价',
    path: '/order/evaluation',
  },
  {
    title: '待付款',
    path: '/order/obligationItem',
  },
])
</script>

<template>
  <div class="order-top">
    <VanSticky>
      <TheSearch></TheSearch>
      <van-tabs v-model="active" swipeable>
        <van-tab v-for="(item, index) in arr" :title="item.title" :to="item.path" :key="index">
        </van-tab>
      </van-tabs>
    </VanSticky>
  </div>
  <router-view></router-view>
  <TabsView></TabsView>
</template>

<style scoped></style>
